package com.skyhigh.web.webservice.domain;

// Generated 26/03/2012 11:56:15 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.Proxy;

/**
 * Cliente generated by hbm2java
 */
@Entity
@Table(name = "cliente", catalog = "proyecto_metodologia", uniqueConstraints = @UniqueConstraint(columnNames = "email"))
@TableGenerator(name="generatorName", 
table="secuencia",  
pkColumnName="codigo",  
pkColumnValue = "Cliente.id",
valueColumnName="valor",  
allocationSize=100)
@Proxy( lazy=false )
public class Cliente implements java.io.Serializable {

	private int idCliente;
	private String nombreCompleto;
	private String email;
	private String cedula;
	private Set<Factura> facturas = new HashSet<Factura>(0);
	private Set<Contenedor> contenedors = new HashSet<Contenedor>(0);
	private Set<Carga> cargas = new HashSet<Carga>(0);
	private Set<Documento> documentos = new HashSet<Documento>(0);

	public Cliente() {
	}

	public Cliente(int idCliente, String nombreCompleto, String email,
			String cedula) {
		this.idCliente = idCliente;
		this.nombreCompleto = nombreCompleto;
		this.email = email;
		this.cedula = cedula;
	}

	public Cliente(int idCliente, String nombreCompleto, String email,
			String cedula, Set<Factura> facturas, Set<Contenedor> contenedors,
			Set<Carga> cargas, Set<Documento> documentos) {
		this.idCliente = idCliente;
		this.nombreCompleto = nombreCompleto;
		this.email = email;
		this.cedula = cedula;
		this.facturas = facturas;
		this.contenedors = contenedors;
		this.cargas = cargas;
		this.documentos = documentos;
	}

	@Id
	@Column(name = "idCliente", unique = true, nullable = false)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="generatorName")
	public int getIdCliente() {
		return this.idCliente;
	}

	public void setIdCliente(int idCliente) {
		this.idCliente = idCliente;
	}

	@Column(name = "nombreCompleto", nullable = false)
	public String getNombreCompleto() {
		return this.nombreCompleto;
	}

	public void setNombreCompleto(String nombreCompleto) {
		this.nombreCompleto = nombreCompleto;
	}

	@Column(name = "email", unique = true, nullable = false)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "cedula", nullable = false, length = 45)
	public String getCedula() {
		return this.cedula;
	}

	public void setCedula(String cedula) {
		this.cedula = cedula;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cliente")
	public Set<Factura> getFacturas() {
		return this.facturas;
	}

	public void setFacturas(Set<Factura> facturas) {
		this.facturas = facturas;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cliente")
	public Set<Contenedor> getContenedors() {
		return this.contenedors;
	}

	public void setContenedors(Set<Contenedor> contenedors) {
		this.contenedors = contenedors;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "idCliente")
	public Set<Carga> getCargas() {
		return this.cargas;
	}

	public void setCargas(Set<Carga> cargas) {
		this.cargas = cargas;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cliente")
	public Set<Documento> getDocumentos() {
		return this.documentos;
	}

	public void setDocumentos(Set<Documento> documentos) {
		this.documentos = documentos;
	}

}
